GXOpenPrintFile
You can use theGXOpenPrintFile
function to open a print file.
gxPrintFile GXOpenPrintFile (gxJob aPrintFileJob, FSSpecPtr pFileSpec, char permission);
aPrintFileJob
- A reference to the job object to associate with a particular printer file.
pFileSpec
- A pointer to a file system specification.
permission
The access privileges to use when opening the print file object.- function result
- A reference to a print file object.
DESCRIPTION
TheGXOpenPrintFile
function attempts to open the print file specified by a pointer to a file system specification record,pFileSpec
. If successful, the function returns a print file object that represents the file. Thepermission
parameter specifies the access privileges, which can be read-only or read-and-write access.The information for the print file's job object is unflattened into the job object you specify in the
aPrintFileJob
parameter. This job object specified in the parameter remains associated with the print file until you close the file by calling theGXClosePrintFile
function.To check for errors, you should call the
GXGetJobError
function with the specified job object following calls that operate on the print file.SPECIAL CONSIDERATIONS
TheGXOpenPrintFile
function sets up a warning handler, which chains to the application's warning handler, if it exists. For more information about warning handlers, see the errors, warnings, and notices chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. gxIncompletePrintFileErr Contents of file are incomplete. gxCrashedPrintFileErr File is currently printing or crashed while printing. gxInvalidPrintFileVersion Cannot read file due to incompatible file version. gxFlattenVersionTooNew An attempt was made to unflatten a job object that was flattened using a later version of QuickDraw GX. collectionVersionErr The version of the collection object is not compatible with the current version of the Collection Manager. SEE ALSO
For an example that uses theGXOpenPrintFile
function, see "Opening and Closing a Print File" on page 4-29.To close a print file object, you use the
GXClosePrintFile
function, which is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help